﻿using System;
using System.Collections.Generic;
using Pap.Services.Vactions;
using Pap.Web.Utils;

namespace Pap.Web.Modules.Administration.ViewModel
{
    /// <summary>
    /// 
    /// </summary>
    public class YearVacationsViewModel : IViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        IVacationService _VacService;
        /// <summary>
        /// Initializes a new instance of the <see cref="YearVacationsViewModel"/> class.
        /// </summary>
        /// <param name="vacService">The vac service.</param>
        public YearVacationsViewModel(IVacationService vacService)
        {
            _VacService = vacService;
        }

        /// <summary>
        /// Gets the vacation by month.
        /// </summary>
        /// <param name="monthNumber">The month number.</param>
        /// <returns></returns>
        public IEnumerable<DateTime> GetVacationByMonth(int monthNumber)
        {
            return this._VacService.GetVacationsByMonth(monthNumber);
        }

        /// <summary>
        /// Inserts the vac date.
        /// </summary>
        /// <param name="newVacDate">The new vac date.</param>
        public void InsertVacDate(DateTime newVacDate)
        {
            _VacService.InsertVacationDate(newVacDate);
        }

        /// <summary>
        /// Deletes the vac date.
        /// </summary>
        /// <param name="vacDate">The vac date.</param>
        public void DeleteVacDate(DateTime vacDate)
        {
            _VacService.DeleteVacation(vacDate);
        }
    }
}
